# $Id: PKGBUILD 78865 2012-10-26 09:32:31Z spupykin $
# Maintainer: Sergej Pupykin <sergej@aur.archlinux.org>
# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>

pkgname=archlinux-xdg-menu
pkgver=0.7.5.5
pkgrel=1
pkgdesc="automatic generate WM menu from xdg files"
arch=('any')
url="http://wiki.archlinux.org/index.php/XdgMenu"
license=("GPL")
depends=('perl' 'perlxml')
optdepends=('sux: for xdg_menu_su')
backup=("etc/update-menus.conf"
	"etc/xdg/menus/arch-applications.menu")
source=("http://archlinux-stuff.googlecode.com/files/arch-xdg-menu-$pkgver.tar.gz")
md5sums=('dd139571e537bbe0190eca53eabb8fd2')

build() {
  cd $srcdir
  install -D -m 0755 xdg_menu $pkgdir/usr/bin/xdg_menu
  install -D -m 0755 xdg_menu_su $pkgdir/usr/bin/xdg_menu_su
  install -D -m 0755 update-menus $pkgdir/usr/sbin/update-menus
  install -D -m 0644 update-menus.conf $pkgdir/etc/update-menus.conf
  mkdir -p $pkgdir/usr/share/desktop-directories/
  cp arch-desktop-directories/* $pkgdir/usr/share/desktop-directories/
  mkdir -p $pkgdir/etc/xdg/menus/
  cp arch-xdg-menu/* $pkgdir/etc/xdg/menus/
  mkdir -p $pkgdir//var/cache/xdg-menu
}
